﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;

public class Dancing : MonoBehaviour
{
 
    private Animator animator; 
    
    void Start()
    {
        animator = GetComponent<Animator>();
    }

    void Update()
    {
	//print("update excute");
	if (Input.GetMouseButton(0))
	{
	    print("start dancing");
            //animator.SetBool("dancing", true);    
	}
	else if(Input.GetMouseButton(1))
        {
            //animator.SetBool("dancing", false);
	    print("stop dancing"); 
        } 
    }

    public void start()
    {
        animator.SetBool("dancing", true);
    }

    public void stop()
    {
        animator.SetBool("dancing", false);
    }
}
